<template>
    <swiper class="detail-swiper">
        <swiper-item v-for="(item,index) in topImages" :key="index">
            <img :src="item" alt="" @load="imgLoad">
        </swiper-item>
    </swiper>
</template>

<script>
import {Swiper, SwiperItem} from 'components/common/swiper'
export default {
  props:{
      topImages:{
          type:Array,
          defaule(){
              return []
          }
      }
  },
  components: {
    Swiper,
    SwiperItem
  },
  data() {
      return {
          isLoad:false
      }
  },
  methods: {
      imgLoad(){
          if(!this.isLoad){
              this.$emit('swiperImageLoad')
              this.isLoad = false
          }
          
      }
  },
}
</script>

<style scoped>
.detail-swiper{
    height: 300px;
    overflow: hidden;
}
</style>